<script setup lang="ts">
interface PropsType {
  visable:boolean;
  modelValue: any;
  finished:(prams?:any)=>void
}

// 接受父组件参数，配置默认值
const props = withDefaults(defineProps<PropsType>(), {
  visable:false,
  modelValue: {}
});

const emit = defineEmits(['update:modelValue'])

const submit = ()=>{
  props.finished('submit')
}

const cancel = ()=>{
  props.finished('close')
}


</script>

<template>
  <a-modal
      :width="1000"
      ref="shareModalRef"
      v-model:visible="props.visable"
      :wrap-style="{ overflow: 'hidden' }"
      :destroyOnClose="true"
      :maskClosable="false"
      @cancel="cancel"
    >
    <a-input v-model:value="modelValue.name"></a-input>
    <a-button type="primary" @click="submit">提交</a-button>
  </a-modal>
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
